<h1>Editing language</h1>

<% form_for(@language) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :code %><br />
    <%= f.text_field :code %>
  </p>
  <p>
    <select name="language[country_id]">
	   <%= options_from_collection_for_select @countries, "id", "name", @language.country.id %>
    </select>
  </p>
  
  <p>
    <%= f.label :priority %><br />
    <%= f.text_field :priority %>
  </p>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @language %> |
<%= link_to 'Back', languages_path %>